#include <QCoreApplication>
#include <QTextStream>
#include <QHash>
#include "BaseMap.h"
#include "parse.h"
#include "persistence.h"


void welcome()
{
    QTextStream cout(stdout,QIODevice::ReadWrite);
    cout<<"Welcome to YiDB2 copyright (c) 2016 inspire for yidb"<<endl;
    return ;
}


int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    welcome();
    Persistence persis;
    //persis.SaveHashToFile();
    QTextStream cout(stdout,QIODevice::ReadWrite);
    QTextStream in(stdin,QIODevice::ReadWrite);
    QString Parse;
    QHash<QString,QString> YiDB2Hash;
    while(true)
    {
        cout<<">>>";
        cout.flush();
        Parse = in.readLine();
        Command_Error(Command_Parse(&YiDB2Hash,&Parse));
        cout<<endl;
    }
    return a.exec();
}
